/*  VisualGroup JavaScript prototype Classes, version draf
 *  (c) 2006 Bill Vison <vison_ruan@126.com>
 *
 *
/*--------------------------------------------------------------------------*/
Vsg.Dialog.Interaction = Class.create();

Vsg.Dialog.Interaction.prototype.initialize = function() {
	
	var $parentOpenerDoc = null;
	var $argument = null;
	var $userDatas = null;
	
	function initParentOpener() {
		
		if (window.opener == undefined) {
			// load the modal window arguement
			$parentOpenerDoc = window.dialogArguments;
		}
		else {
			$parentOpenerDoc = window.opener;
		}
		
		$argument = $parentOpenerDoc.popupArgument;
		$userDatas = $parentOpenerDoc.popupUserData;
	}
	initParentOpener();
	
	function getValue(name) {
		var value = null;
		for (index in $argument) {
			if ($argument[index].name == name) {
				value = $argument[index].value;
				break;
			}
		}
		return value;
	}
	
	this.getUserData = function(name) {
		var value = null;
		for (index in $userDatas) {
			if ($userDatas[index].name == name) {
				value = $userDatas[index].value;
				break;
			}
		}
		return value;
	}	

}

